package com.yunxi.estate.config.core.mapper;

import com.yunxi.estate.config.core.domain.AddBody;
import com.yunxi.estate.config.core.domain.LoginBody;
import com.yunxi.estate.domain.AddInfo;
import com.yunxi.estate.domain.AddUser;
import com.yunxi.estate.domain.SysUser;
import org.apache.ibatis.annotations.Mapper;

/**
 * 登录注册业务
 *
 * @author 松子鱼
 */
@Mapper
public interface LoginMapper {

    /**
     * 查找登录对象
     */
    public SysUser selectLoginUser(LoginBody loginInfo);

    /**
     * 查找手机号是否存在
     */
    public String selectUserPhone(String phone);

    /**
     * 查找用户姓名是否存在
     */
    public String selectUserName(String userName);

    /**
     * 新增对象
     */
    public int insertUser(SysUser user);

    /**
     * 查询对象ID
     */
    public Long selectUserId(SysUser user);

    /**
     * 新增地址
     */
    public int insertAddress(AddUser addInfo);

    /**
     * 查询验证地址ID
     */
    public Long selectAddId(AddBody addBody);
}
